import java.awt.BorderLayout;

import javax.swing.JFrame;

/**
 * GUI resizing behavior.
 */
public class Drawing
{
	ToolsPanel toolsPanel;
	CanvasPanel canvasPanel;
	
	public Drawing() {
		createAndShowGUI();
	}
	
	public void createAndShowGUI() {
		JFrame frame = new JFrame();
		frame.setTitle("Drawing");
		frame.setLocation(300, 100);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(new BorderLayout());

		toolsPanel = new ToolsPanel();
		canvasPanel = new CanvasPanel();
		
		frame.getContentPane().add(toolsPanel, BorderLayout.LINE_START);
		frame.getContentPane().add(canvasPanel, BorderLayout.CENTER);

		frame.pack();
		frame.setVisible(true);
	}
	
	public static void main(String[] args) {
		new Drawing();
	}
}